package com.zjol

/**
  * Created by Administrator on 2017/3/27.
  */
class Person {
  private var age=0
  def increment={
    age+=1
  }
  def  cuurent=age

}

class  Student{
  private[this]  var age=0
}


object HelloOOP{
  def main(args: Array[String]): Unit = {

    val person=new Person;
    person.increment
    person.increment
    println(person.cuurent)
    val student=new Student



  }
}